package com.study.model.user;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import lombok.Data;
import java.util.Date;
/*
* 角色表（如管理员、普通用户等）
* */
@Data
@TableName("sys_role")
@Schema(description = "角色信息表")
@Entity
public class SysRole {

    private static final long serialVersionUID = 1L;
    @jakarta.persistence.Id
    @Schema(description = "id")
    @TableId(type = IdType.AUTO)
    @org.springframework.data.annotation.Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Schema(description = "角色名称，如管理员、普通用户")
    private String roleName;

    @Schema(description = "角色编码，如 ROLE_ADMIN")
    private String roleCode;

    @Schema(description = "角色描述")
    private String description;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}

